package service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import vo.DepartmentVO;
import vo.MemberVO;
import dao.RankDao;

@Service
public class RankServiceImpl implements RankService{
	@Resource(name="rankDaoImpl")
	private RankDao rankDao;

	@Override
	public List<MemberVO> memberMonthRank(String type) {
		return rankDao.memberMonthRank(type);
	}

	@Override
	public List<DepartmentVO> deptMonthRank(String type) {
		return rankDao.deptMontRank(type);
	}

	@Override
	public Map<String, Integer> todayCount() {
		HashMap<String, Integer> map = new HashMap<String, Integer>();
		int todayMemberCount = rankDao.todayMemberCount();
		map.put("member", todayMemberCount);
		int todayStairCount = rankDao.todayStairCount();
		map.put("stair", todayStairCount);
		return map;
	}
	
	
}
